import time
def bubble_sort(list):
    for i in range(len(list) - 1):
        for j in range(len(list) - 1):
            if list[j] > list[j+1]:
                list[j],list[j+1] = list[j+1], list[j]
    return list

def read_file(file_name):
    file=open(file_name, 'r')
    data=file.readlines()
    return data

s1=read_file("file1.txt")
s2=read_file("file2.txt")
s3=read_file("file3.txt")

t_start=time.time()
bubble_sort(s1)
t_finish=time.time()
print("s1",round((t_finish-t_start)*1000),"milliseconds")

t_start=time.time()
bubble_sort(s2)
t_finish=time.time()
print("s2",round((t_finish-t_start)*1000),"milliseconds")

t_start=time.time()
bubble_sort(s3)
t_finish=time.time()
print("s3",round((t_finish-t_start)*1000),"milliseconds")
